package com.jasper.entertaining;

import com.alibaba.druid.pool.DruidDataSource;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;

@SpringBootApplication
//@SpringBootApplication(exclude= {DataSourceAutoConfiguration.class})
@ComponentScan(basePackages = {"com.jasper.entertaining.mapper","com.jasper.entertaining.service","com.jasper.entertaining.controller","com.jasper.entertaining.entity"})
//@ComponentScan(basePackages = {"com.jasper.entertaining.*"})
public class EntertainingApplication {

    public static void main(String[] args) {
        SpringApplication.run(EntertainingApplication.class, args);
    }
    @ConfigurationProperties(prefix = "spring.datasource")
    @Bean
    public DruidDataSource druidDataSource(){
        return new DruidDataSource();
    }

}
